html.printMedia {
	@page { size: A4; margin: 0px 1.5cm; }
	@page:first { margin-top: 0px; }

	body { margin: 0px; -webkit-print-color-adjust: exact; caret-color: transparent; }

	#selection * { user-select: text; }
	.overPopup { overflow: visible !important; }

	#menuBar, 
	#previewLink, 
	.menu, 
	.controlButtons, 
	.header, 
	.footer,
	.notifications,
	.sidebar,
	.sidebarDummy,
	.progress,
	.toast,
	.focusable.isFocused::before,
	#vault,
	#sidebarLeftButton,
	#sidebarRightButton,
	.tableOfContents
	{ display: none !important; }

	#pageFlex.isFull {
		#page { width: 100% !important; }
	}

	.focusable.isFocused { background: none !important; }

	.popups {
		.popup { position: relative; }
		.dimmer { display: none !important; }

		.popup.popupPage {
			.innerWrap { 
				width: 100% !important; height: auto !important; margin: 0px !important; left: 0px; top: 0px; 
				border-radius: 0px; box-shadow: 0px 0px; overflow: visible; position: static;
			}
		}

		.popup.popupExport { display: none !important; }
	}
	
	#editorWrapper { padding-left: 48px; }
	#editorWrapper {
		#editorSize { display: none !important; }
	}

	#bodyWrapper { padding: 0px !important; }

	.pageMainRelation {
		.wrapper { padding: 2cm 0px; }
		.wrapper {
			.head {
				.side.center { margin: 0px; }
				.side.right { display: none; }
			}	
		}
	}

	.block.blockCover { left: 0px !important; top: 0px !important; width: 100%; border-radius: 0px; }
	.block.blockCover {
		.elements { display: none; }
	}

	.blocks { width: 100%; }
	.blocks {
		#button-block-add { display: none; }

		.block {
			.icon.dnd { display: none; }
		}

		.block.blockLink, 
		.block.blockBookmark { break-inside: avoid; }

		.block.blockLink {
			.cover { -webkit-print-color-adjust: exact; }
		}

		.block.blockEmbed {
			.icon.source, 
			.icon.resize { display: none; }
		}

		.block.blockMedia {
			.icon.play, 
			.icon.download, 
			.icon.resize { display: none; }
		}

		.block.blockText {
			.placeholder { display: none !important; }
		}
		.block.blockText.textCode > .wrapContent > .selectionTarget > .dropTarget #value { white-space: pre-wrap; overflow-x: visible; }

		.block.blockMedia.isAudio > .wrapContent { box-shadow: 0px 0px; }
		.block.blockMedia.isAudio {
			.mediaAudio {
				.controlsWrapper {
					.controls {
						.input-drag-horizontal {
							.back { width: 100% !important; }
						}
					}
				}
			}
		}

		.block.blockDataview.isInline {
			.content {
				.scroll { width: 100% !important; margin: 0px !important; padding-left: 0px !important; }
			}
		}

		.block.blockDataview {
			.viewContent.viewGallery {
				.card { box-shadow: 0px 0px; }
			}
		}

		.block.blockLink.card {
			.linkCard { box-shadow: 0px 0px; }
		}

		.block.blockBookmark {
			.inner { box-shadow: 0px 0px; }
		}

		.block.blockBookmark {
			.inner { box-shadow: 0px 0px; }
		}

		.block.blockRelation {
			.info { width: auto; }
		}

		.block.blockTable {
			.handle { display: none; }
		}
	}

	.editor {
		.blockLast { display: none; }
	}
}

html.printMedia.themeDark {
	--color-bg-primary: #000;
}

html.printMedia.print {
	#editorWrapper { width: 100% !important; }

	.blocks {
		.block.blockTable { width: 100% !important; margin: 0px !important; }
		.block.blockTable {
			.scrollWrap > .inner { width: 100% !important; }
			.row { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important; }
		}
	}
}

html.printMedia.withPopup {
	#pageFlex.isFull { display: none !important; }
}

@media (max-width: 500px) {
	html.printMedia.save {
		#editorWrapper { width: calc(100% - 32px) !important; margin: 0px 16px; padding-left: 0px; }
		.blocks { width: calc(100% + 48px) !important; }
	}
}